package com.xpec.c4.net.codec;

import net.sf.cindy.Packet;
import net.sf.cindy.PacketDecoder;
import net.sf.cindy.Session;
import net.sf.cindy.util.Charset;

/**
 * 
 * 
 * @author Bany
 *
 * @since 2009-4-28 下午11:19:14
 *
 */

public class StringDecoder implements PacketDecoder{

	@Override
	public Object decode(Session session, Packet packet) throws Exception {
		String value=packet.getContent().getString(Charset.UTF8,packet.getContent().limit());
		return value;
	}

}
